﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;

namespace MapLibrary.Particles
{
    /// <summary>
    /// Defines the initial conditions for a particle.  This is used to produce particles with the proper
    /// settings.
    /// </summary>
    public class ParticleInitialConditions
    {
        /// <summary>
        /// The name of the SpriteType underlying the particle.
        /// </summary>
        public string Type
        {
            get;
            set;
        }

        /// <summary>
        /// Starting position of the Particle.
        /// </summary>
        public Vector2 Position
        {
            get;
            set;
        }

        /// <summary>
        /// Starting Velocity of the Particle.
        /// </summary>
        public Vector2 Velocity
        {
            get;
            set;
        }


        /// <summary>
        /// Whether or not gravity should affect this particle.
        /// </summary>
        public bool AffectedByGravity
        {
            get;
            set;
        }

        /// <summary>
        /// Whether or not the particle is kinematic (has mass).
        /// </summary>
        public bool Kinematic
        {
            get;
            set;
        }

        /// <summary>
        /// How long the particle should live in the level.
        /// </summary>
        public int Lifetime
        {
            get;
            set;
        }

        public ParticleInitialConditions Copy()
        {
            ParticleInitialConditions toReturn = new ParticleInitialConditions();
            toReturn.Position = Position;
            toReturn.Kinematic = Kinematic;
            toReturn.Lifetime = Lifetime;
            toReturn.Type = Type;
            toReturn.Velocity = Velocity;
            toReturn.AffectedByGravity = AffectedByGravity;

            return toReturn;
        }
    }
}
